//École de Technologie Supérieure (ÉTS)
//LOG720 - Laboratoire 3  - Intégration de Spring + Hibernate
//Date de remise: 2011-12-13
//Auteurs:
//Jonathan Aubuchon (AUBJ18038704)
//Jeff Grenier (GREJ02098703)
//Francis Paré (PARF21038708)

package springapp.service;

import java.util.List;

import springapp.domain.Infraction;
import springapp.repository.InfractionDAO;

public class InfractionManager {
	
	private InfractionManager(){}
	
	private static InfractionManager instance = new InfractionManager();
	
	public static InfractionManager getInstance(){
		return instance;
	}
	
	public List<Infraction> getInfractions(){
		InfractionDAO infractionDAO = new InfractionDAO();
		return infractionDAO.selectInfractions();
	}
	
	public boolean ajouterInfraction(Infraction i){
		InfractionDAO infractionDAO = new InfractionDAO();
		boolean isSuccess = infractionDAO.insertInfraction(i);
		return isSuccess;
	}

}
